package sdufe.lele.result;

import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by olivia on 3/23/2017.
 */


@Repository
public class MapResult extends Result {


    private Map<String, Object> data;

    public MapResult() {
        super(200);
        this.data = new HashMap<String,Object>();
    }

    public MapResult(String key, Object value) {
        super(200);
        this.data = new HashMap<String,Object>();
        this.data.put(key, value);
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(Map<String, Object> data) {
        this.data = data;
    }

    public void put(String key, Object object) {
        data.put(key, object);
    }
}
